#ifndef QNIGAAPP
#define QNIGAAPP

#include "ui/i.h"
#include "config/manager.h"

#include <QtGui/QApplication>
#include <memory>

class QnigaApp : public QApplication
{
    Q_OBJECT

    public:

        QnigaApp (int& _argc, char** _argv);

        ~QnigaApp ();

        static QnigaApp& Get ();

        QnigaUI::I& GetUI ();

        const Config::Core::I& GetCoreConfig () const;

        const Config::GUI::I& GetGUIConfig () const;

    private:

        void ReportErrorUnknownSwitch (const QString& _switch) const;

        void ProcessCfgFile();

        void ProcessCmdLine();

    private:

        static QnigaApp* ms_App;

        std::auto_ptr<QnigaUI::I> m_UI;

        Config::Manager m_CfgManager;
};

#endif // QNIGAAPP
